#ifndef __WHEEL_GROUP_H__
#define __WHEEL_GROUP_H__

#include "main.h"

#include "rm_motor.h"
#include "can.h"

#include "pid.h"

typedef struct __wheel_group_dataTypeDef
{
	float angle;// [-PI, PI]
	float rudder_speed;
	float driving_speed;// rad per second
}wheel_group_dataTypeDef;

extern float wheel_group_rudder_speed_target[2];
extern float wheel_group_driving_speed_target[2];
extern wheel_group_dataTypeDef wheel_group_data[2];

void wheel_group_init();
void wheel_group_controller_execute();
void wheel_group_rudder_callback(CAN_RxHeaderTypeDef* rx_header, uint8_t* data);
void wheel_group_driving_callback(CAN_RxHeaderTypeDef* rx_header, uint8_t* data);

#endif